﻿@using System.Xml
@{
    ViewBag.Title = "Payment";
}

<link rel="stylesheet" href="~/Content/reservation/checkOut.css" />
<script src="~/Scripts/Payment.js"></script>

<div class="">
<p class="gkHeadline">Thanh toán trực tuyến</p>
<p class="gkSubHeadline" style="margin-top:-4px;margin-bottom:7px">Thông tin thanh toán</p>
</div>

<input type="hidden" id="VND-Amount" value="@Model[2]"/>

<form id="thanhToan" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="lmnhuy@gmail.com">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="@Model[1]">
    <input type="hidden" name="item_number" value="@Model[0]">
    <input type="hidden" id="amount" name="amount" value="0.00">
    <input type="hidden" name="currency_code" value="USD">
</form>

<table id="tableGD" class="gkTable" border="1" style="margin:20px auto 0 auto">
<thead>			
</thead>
<tbody id="results" style="text-align:center">
    <tr class='gkTableColor' style='background:none repeat scroll 0 0 #454545'>
        <td>Mã giao dịch</td>
        <td>CMND giao dịch</td>
        <td>Số tiền giao dịch (VND)</td>
        <td>Ngoại tệ</td>
    </tr>
    <tr>
        <td>@Model[0]</td>
        <td>@Model[1]</td>
        <td>@Model[2]</td>
        <td id="tbAmount"></td>
    </tr>	
</tbody>
</table>

@{
XmlDocument doc = new XmlDocument();
doc.Load("http://www.vietcombank.com.vn/ExchangeRates/ExrateXML.aspx");
XmlNode nodeDate = doc.SelectSingleNode("//ExrateList/DateTime");
XmlNodeList nodes = doc.SelectNodes("//ExrateList/Exrate"); }


<div id="checkOut">
    <div id="tableRate">
        <p class="gkSubHeadline" style="margin-top: 25px; margin-bottom: 2px">@nodeDate.InnerText</p>
        <table class="gkTable" border="1" style="">
            <thead>
            </thead>
            <tbody style="text-align: center">
                <tr class='gkTableColor' style='background: none repeat scroll 0 0 #454545'>
                    <td>Tiền tệ</td>
                    <td>Giá mua (VND)</td>
                    <td>Giá bán (VND)</td>
                </tr>
                <tr>
                    <td>@nodes[17].Attributes[0].InnerText</td>
                    <td>@nodes[17].Attributes[2].InnerText</td>
                    <td id="USD-Sell">@nodes[17].Attributes[4].InnerText</td>
                </tr>
            </tbody>
        </table>
    </div>
    <div id="imgPP" >
        <img id="btnPaypal" src="/Images/btnPayPal.gif" />
    </div>
    <div class="clear"></div>
</div>
